package com.cloud.bc.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cloud.bc.model.entity.BcUserGifts;
import com.cloud.bc.model.response.AjaxResp;
import com.cloud.bc.model.response.UserGiftCountResponse;
import com.cloud.bc.model.response.UserGiftResponse;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * 礼物赠送记录
 *
 * @author douhaichao code generator
 * @date 2021-01-13 11:11:21
 */
public interface BcUserGiftsService extends IService<BcUserGifts> {

    int count(BcUserGifts req);

    List<BcUserGifts> selectAll(BcUserGifts req);

    IPage<BcUserGifts> selectPage(Page page, BcUserGifts req);

    IPage<BcUserGifts> selectPageByLike(Page page, BcUserGifts req);

    BcUserGifts selectOne(BcUserGifts req);

    List<UserGiftResponse> getReceiveGift(Page page, Integer userId);

    List<UserGiftResponse> getGiveGift(Page p, Integer id);

    /**
     * 收到的礼物数量
     * @param giveUserId 收礼人ID
     * @return
     */
    List<UserGiftCountResponse> getReceiveGiftCount(Integer giveUserId);

     AjaxResp userGift(HttpServletRequest request, int userId, int giftId);
}
